<template>
  <div>
    <!-- 文章列表 -->
    <ArticleItem v-for="obj in arr"
    :key="obj.art_id"
    :item="obj"
    @removeE='removeFn'
    ></ArticleItem>
  </div>
</template>

<script>
import ArticleItem from '@/components/ArticleItem.vue'
export default {
  props: {
    arr: {
      type: Array,
      default () {
        // 给arr变量一个默认值
        return []
      }
    }
  },
  methods: {
    // 子反馈要删除的数据
    removeFn (item, action) {
      this.$emit('re', item, action)
    }
  },
  components: {
    ArticleItem
  }
}
</script>
